program main
  use iso_c_binding
  implicit none
  include "uhm/wrapper/fort/parameters.f90"

  character(len=256) :: argv
  character(len=32) :: &
       opt_bool   ='-bool',   text_bool   ='setting bool', &
       opt_int    ='-int',    text_int    ='setting int', &
       opt_double ='-double', text_double ='setting double'
       
  logical :: bool_val
  integer :: int_val
  real :: real_val
  real :: t1, t2
  
  call get_command(argv)

  call uhm_initialize(argv)
  
  call uhm_verbose_begin

  ! not working...
  call uhm_get_option_bool(trim(opt_bool), trim(text_bool),  .TRUE., bool_val)
  call uhm_get_option_int(trim(opt_int), trim(text_int), 10, int_val)
  call uhm_get_option_double(trim(opt_double), trim(text_double), 13.d0, real_val)
  
  call uhm_verbose_end

  call uhm_time_begin
  call uhm_time_in()
  call uhm_time_in()
  call uhm_time_out(t1)
  call uhm_time_out(t2)
  call uhm_time_end

  call uhm_finalize
  
end program main
